<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<%@ include file="/common/taglibs.jsp"%>

<c:choose>
	<c:when test="${fn:length(notepadList) gt 0 }">
		<c:forEach var="notepad" items="${notepadList }" varStatus="i">
			<table style="width: 100%;">
				<tr>
					<td rowspan="2" style="width: 60px;text-align: center;">
						<div style="width: 32px;height: 32px;margin-left: 12px;">
							<c:choose>
								<c:when test="${notepad.user.userInfo.avatar ne null }">
									<img src="${ctx }/images/avatar.gif" />
								</c:when>
								<c:otherwise>
									<img src="${ctx }/images/avatar.gif" />
								</c:otherwise>
							</c:choose>
						</div>
						<label class="label" style="margin-left: -2px;">${notepad.user.displayName }</label>
					</td>
					<td>
						<div style="float: left;">
							<c:choose>
								<c:when test="${notepad.type ge 100}">
									<img src="${ctx }/images/<fmt:message key='img_type_${notepad.type }'></fmt:message>" />
								</c:when>
								<c:otherwise>
									<img src="${ctx }/images/clock.png" />
								</c:otherwise>
							</c:choose>
							<label><fmt:formatDate value="${notepad.signInTime }" pattern="yyyy年MM月dd日 hh:ss"/></label>
						</div>
						<div style="float: left;margin-left: 50px;">
							<img src="${ctx }/images/<fmt:message key='img_mode_${notepad.mode }'></fmt:message>" />
							<label><fmt:message key="info_mode_${notepad.mode }"></fmt:message></label>
						</div>
					</td>
				</tr>
				<tr>
					<td style="padding-top: 15px;">
						<div class="container" style="width: 500px;height: 80px;">
							<div class="content">
								<div style="text-indent: 2em;">
									<c:choose>
										<c:when test="${notepad.type lt 100 }">
											<c:choose>
												<c:when test="${notepad.content eq '' or notepad.content eq null }">
													<label class="label">${notepad.user.displayName }</label> 于 <label class="label"><fmt:formatDate value="${notepad.signInTime }" pattern="yyyy年MM月dd日 hh:ss"/></label> , 通过  <label class="label"><fmt:message key="info_mode_${notepad.mode }"></fmt:message></label> 签到。
												</c:when>
												<c:otherwise>
													<label class="label"><fmt:message key='info_period_${notepad.period }'></fmt:message></label>&nbsp;&nbsp;通过<fmt:message key="info_style_${notepad.mode }"></fmt:message>&nbsp;&nbsp;<label class="label">签到</label>
													<br />
													<label class="label" style="margin-left: 2em;"><fmt:message key='info_type_${notepad.period }_${notepad.type }'></fmt:message></label>
													<br />
													<label style="margin-left: 2em;">附言：${notepad.content }</label>
												</c:otherwise>
											</c:choose>
										</c:when>
										<c:otherwise>
											${notepad.content }
										</c:otherwise>										
									</c:choose>
								</div>
							</div>
							<s style="left: 20px;"><i></i></s>
						</div>
					</td>
				</tr>
			</table>
			<c:if test="${!i.last }">
				<p />
				<hr />
			</c:if>
		</c:forEach>
	</c:when>
	<c:otherwise>
		暂无内容，快去添加新的记事或签到！
	</c:otherwise>
</c:choose>
